3.1.5 \(\int (a+b \log (c x^n)) \log (1+e x) \, dx\) [5]

Optimal. Leaf size=74 \[ 2 b n x-x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (1+e x) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {b n \text {Li}_2(-e x)}{e} \]

[Out]

2*b*n*x-x*(a+b*ln(c*x^n))-b*n*(e*x+1)*ln(e*x+1)/e+(e*x+1)*(a+b*ln(c*x^n))*ln(e*x+1)/e+b*n*polylog(2,-e*x)/e

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {2436, 2332, 2417, 2458, 45, 2393, 2352} \begin {gather*} \frac {b n \text {PolyLog}(2,-e x)}{e}+\frac {(e x+1) \log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{e}-x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (e x+1) \log (e x+1)}{e}+2 b n x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*Log[1 + e*x],x]

[Out]

2*b*n*x - x*(a + b*Log[c*x^n]) - (b*n*(1 + e*x)*Log[1 + e*x])/e + ((1 + e*x)*(a + b*Log[c*x^n])*Log[1 + e*x])/
e + (b*n*PolyLog[2, -(e*x)])/e

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2417

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx &=-x \left (a+b \log \left (c x^n\right )\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}-(b n) \int \left (-1+\frac {(1+e x) \log (1+e x)}{e x}\right ) \, dx\\ &=b n x-x \left (a+b \log \left (c x^n\right )\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}-\frac {(b n) \int \frac {(1+e x) \log (1+e x)}{x} \, dx}{e}\\ &=b n x-x \left (a+b \log \left (c x^n\right )\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}-\frac {(b n) \text {Subst}\left (\int \frac {x \log (x)}{-\frac {1}{e}+\frac {x}{e}} \, dx,x,1+e x\right )}{e^2}\\ &=b n x-x \left (a+b \log \left (c x^n\right )\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}-\frac {(b n) \text {Subst}\left (\int \left (e \log (x)+\frac {e \log (x)}{-1+x}\right ) \, dx,x,1+e x\right )}{e^2}\\ &=b n x-x \left (a+b \log \left (c x^n\right )\right )+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}-\frac {(b n) \text {Subst}(\int \log (x) \, dx,x,1+e x)}{e}-\frac {(b n) \text {Subst}\left (\int \frac {\log (x)}{-1+x} \, dx,x,1+e x\right )}{e}\\ &=2 b n x-x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (1+e x) \log (1+e x)}{e}+\frac {(1+e x) \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{e}+\frac {b n \text {Li}_2(-e x)}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 90, normalized size = 1.22 \begin {gather*} \frac {-a e x+2 b e n x+a \log (1+e x)-b n \log (1+e x)+a e x \log (1+e x)-b e n x \log (1+e x)+b \log \left (c x^n\right ) (-e x+(1+e x) \log (1+e x))+b n \text {Li}_2(-e x)}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*Log[1 + e*x],x]

[Out]

(-(a*e*x) + 2*b*e*n*x + a*Log[1 + e*x] - b*n*Log[1 + e*x] + a*e*x*Log[1 + e*x] - b*e*n*x*Log[1 + e*x] + b*Log[
c*x^n]*(-(e*x) + (1 + e*x)*Log[1 + e*x]) + b*n*PolyLog[2, -(e*x)])/e

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.09, size = 557, normalized size = 7.53

method result size
risch \(x \ln \left (e x +1\right ) a -\frac {b n \ln \left (e x +1\right )}{e}+\frac {a \ln \left (e x +1\right )}{e}-\ln \left (c \right ) b x -\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{2}-\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{2}-\frac {i \ln \left (e x +1\right ) \pi x b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}-\frac {i \ln \left (e x +1\right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2 e}+\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}-\frac {b \ln \left (c \right )}{e}+2 b n x -\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2 e}-\frac {i \ln \left (e x +1\right ) \pi x b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2}-\frac {a}{e}+\frac {2 b n}{e}-n b x \ln \left (e x +1\right )-a x +\frac {b n \dilog \left (e x +1\right )}{e}+\ln \left (e x +1\right ) \ln \left (c \right ) x b +\frac {\ln \left (e x +1\right ) b \ln \left (c \right )}{e}+\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2 e}+\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x}{2}+\left (b x \ln \left (e x +1\right )+\frac {b \left (-e x +\ln \left (e x +1\right )\right )}{e}\right ) \ln \left (x^{n}\right )+\frac {i \ln \left (e x +1\right ) \pi x b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2 e}+\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 e}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x}{2}+\frac {i \ln \left (e x +1\right ) \pi x b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2}\) \(557\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(e*x+1),x,method=_RETURNVERBOSE)

[Out]

x*ln(e*x+1)*a-1/e*b*n*ln(e*x+1)+a/e*ln(e*x+1)-ln(c)*b*x+1/2*I/e*ln(e*x+1)*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2-1/e*b
*ln(c)-1/2*I*ln(e*x+1)*Pi*x*b*csgn(I*c*x^n)^3+2*b*n*x-1/2*I/e*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2-1/2*I/e*ln(e*x+1)
*Pi*b*csgn(I*c*x^n)^3-a/e-1/2*I/e*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2*x+2/e*
b*n-1/2*I/e*ln(e*x+1)*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/2*I*ln(e*x+1)*Pi*x*b*csgn(I*c)*csgn(I*x^n)*cs
gn(I*c*x^n)-n*b*x*ln(e*x+1)-a*x-1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*x+ln(e*x+1)*ln(c)*x*b+1/e*ln(e*x+1)*b*l
n(c)+(b*x*ln(e*x+1)+b*(-e*x+ln(e*x+1))/e)*ln(x^n)+1/e*b*n*dilog(e*x+1)+1/2*I/e*Pi*b*csgn(I*c*x^n)^3+1/2*I*Pi*b
*csgn(I*c*x^n)^3*x+1/2*I*ln(e*x+1)*Pi*x*b*csgn(I*c)*csgn(I*c*x^n)^2+1/2*I/e*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*
c*x^n)+1/2*I/e*ln(e*x+1)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2+1/2*I*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*x+1/2
*I*ln(e*x+1)*Pi*x*b*csgn(I*x^n)*csgn(I*c*x^n)^2

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 127, normalized size = 1.72 \begin {gather*} {\left (\log \left (x e + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-x e\right )\right )} b n e^{\left (-1\right )} - {\left (b {\left (n - \log \left (c\right )\right )} - a\right )} e^{\left (-1\right )} \log \left (x e + 1\right ) + {\left ({\left (b {\left (2 \, n - \log \left (c\right )\right )} - a\right )} x e - {\left ({\left (b {\left (n - \log \left (c\right )\right )} - a\right )} x e + b n \log \left (x\right )\right )} \log \left (x e + 1\right ) - {\left (b x e - {\left (b x e + b\right )} \log \left (x e + 1\right )\right )} \log \left (x^{n}\right )\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1),x, algorithm="maxima")

[Out]

(log(x*e + 1)*log(x) + dilog(-x*e))*b*n*e^(-1) - (b*(n - log(c)) - a)*e^(-1)*log(x*e + 1) + ((b*(2*n - log(c))
 - a)*x*e - ((b*(n - log(c)) - a)*x*e + b*n*log(x))*log(x*e + 1) - (b*x*e - (b*x*e + b)*log(x*e + 1))*log(x^n)
)*e^(-1)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1),x, algorithm="fricas")

[Out]

integral(b*log(c*x^n)*log(x*e + 1) + a*log(x*e + 1), x)

________________________________________________________________________________________

Sympy [A]
time = 176.72, size = 194, normalized size = 2.62 \begin {gather*} a \left (\begin {cases} 0 & \text {for}\: e = 0 \\x \log {\left (e x + 1 \right )} - x + \frac {\log {\left (e x + 1 \right )}}{e} - \frac {1}{e} & \text {otherwise} \end {cases}\right ) - b e^{2} n \left (\begin {cases} \frac {x}{e^{2}} - \frac {\log {\left (e x + 1 \right )}}{e^{3}} & \text {for}\: e = 0 \\\frac {\log {\left (e x + 1 \right )}^{2}}{2 e^{3}} & \text {otherwise} \end {cases}\right ) - b n x \log {\left (e x + 1 \right )} + 2 b n x - b n \left (\begin {cases} 0 & \text {for}\: e = 0 \\\frac {\log {\left (e x + 1 \right )}^{2}}{2 e} & \text {otherwise} \end {cases}\right ) + b n \left (\begin {cases} x & \text {for}\: e = 0 \\\frac {\log {\left (e x + 1 \right )}}{e} & \text {otherwise} \end {cases}\right ) \log {\left (e x + 1 \right )} - b n \left (\begin {cases} x & \text {for}\: e = 0 \\\frac {\log {\left (e x + 1 \right )}}{e} & \text {otherwise} \end {cases}\right ) - b n \left (\begin {cases} x & \text {for}\: e = 0 \\- \frac {\operatorname {Li}_{2}\left (e x e^{i \pi }\right )}{e} & \text {otherwise} \end {cases}\right ) + b x \log {\left (c x^{n} \right )} \log {\left (e x + 1 \right )} - b x \log {\left (c x^{n} \right )} + b \left (\begin {cases} x & \text {for}\: e = 0 \\\frac {\log {\left (e x + 1 \right )}}{e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(e*x+1),x)

[Out]

a*Piecewise((0, Eq(e, 0)), (x*log(e*x + 1) - x + log(e*x + 1)/e - 1/e, True)) - b*e**2*n*Piecewise((x/e**2 - l
og(e*x + 1)/e**3, Eq(e, 0)), (log(e*x + 1)**2/(2*e**3), True)) - b*n*x*log(e*x + 1) + 2*b*n*x - b*n*Piecewise(
(0, Eq(e, 0)), (log(e*x + 1)**2/(2*e), True)) + b*n*Piecewise((x, Eq(e, 0)), (log(e*x + 1)/e, True))*log(e*x +
 1) - b*n*Piecewise((x, Eq(e, 0)), (log(e*x + 1)/e, True)) - b*n*Piecewise((x, Eq(e, 0)), (-polylog(2, e*x*exp
_polar(I*pi))/e, True)) + b*x*log(c*x**n)*log(e*x + 1) - b*x*log(c*x**n) + b*Piecewise((x, Eq(e, 0)), (log(e*x
 + 1)/e, True))*log(c*x**n)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(e*x+1),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log(x*e + 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \ln \left (e\,x+1\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(e*x + 1)*(a + b*log(c*x^n)),x)

[Out]

int(log(e*x + 1)*(a + b*log(c*x^n)), x)

________________________________________________________________________________________